OpenStack Newton : Configure Heat#1
2016/12/22 |
Install OpenStack Orchestration Service (Heat).
This example shows to install Orchestration Services on the existing environment like follows.
For example, install and configure Orchestration Services on the Network Node. | +------------------+ | +------------------------+ | [ Control Node ] | | | [ Network Node ] | | Keystone |10.0.0.30 | 10.0.0.50| DHCP,L3,L2 Agent | | Glance |------------+------------| Metadata Agent | | Nova API |eth0 | eth0| Heat API,API-CFN | | Neutron Server | | | Heat Engine | +------------------+ | +------------------------+ eth0|10.0.0.51 +--------------------+ | [ Compute Node ] | | Nova Compute | | L2 Agent | +--------------------+ |
Add users or databases for Heat services on the Control Node on this section.
|
|
[1] | Install required packages first. |
root@dlp ~(keystone)# apt-get -y install heat-common
|
[2] | Add users and so on for Heat services in Keystone on the Control Node. |
# add Heat user root@dlp ~(keystone)# openstack user create --domain default --project service --password servicepassword heat +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | default_project_id | e2fed44089aa40dc88f5ae6ed9dfe915 | | domain_id | default | | enabled | True | | id | 872936603cfb4bb8bab64f2662ba4e92 | | name | heat | | password_expires_at | None | +---------------------+----------------------------------+ # add Heat user to admin role root@dlp ~(keystone)# openstack role add --project service --user heat admin
# create a role for Heat root@dlp ~(keystone)# openstack role create heat_stack_owner +-----------+----------------------------------+ | Field | Value | +-----------+----------------------------------+ | domain_id | None | | id | 7946da4067e342aa9ef3f090fb6351f1 | | name | heat_stack_owner | +-----------+----------------------------------+root@dlp ~(keystone)# openstack role create heat_stack_user +-----------+----------------------------------+ | Field | Value | +-----------+----------------------------------+ | domain_id | None | | id | 828bc9fe8865439da806566eb0195e95 | | name | heat_stack_user | +-----------+----------------------------------+ # add admin user to heat_stack_owner role root@dlp ~(keystone)# openstack role add --project admin --user admin heat_stack_owner
# create service entry for Heat root@dlp ~(keystone)# openstack service create --name heat --description "Openstack Orchestration" orchestration +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Openstack Orchestration | | enabled | True | | id | b2b9dd57d11a43a6bdda7acefc3270d3 | | name | heat | | type | orchestration | +-------------+----------------------------------+root@dlp ~(keystone)# openstack service create --name heat-cfn --description "Openstack Orchestration" cloudformation +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Openstack Orchestration | | enabled | True | | id | 00fa05c44c42447f8a3f1236fe1874fd | | name | heat-cfn | | type | cloudformation | +-------------+----------------------------------+ # define Heat API server's IP root@dlp ~(keystone)# heat_api=10.0.0.50
# create endpoint entry for orchestration (public) root@dlp ~(keystone)# openstack endpoint create --region RegionOne orchestration public http://$heat_api:8004/v1/%\(tenant_id\)s +--------------+----------------------------------------+ | Field | Value | +--------------+----------------------------------------+ | enabled | True | | id | 6b6588b751b446f999859d327093fb84 | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | b2b9dd57d11a43a6bdda7acefc3270d3 | | service_name | heat | | service_type | orchestration | | url | http://10.0.0.50:8004/v1/%(tenant_id)s | +--------------+----------------------------------------+ # create endpoint entry for orchestration (internal) root@dlp ~(keystone)# openstack endpoint create --region RegionOne orchestration internal http://$heat_api:8004/v1/%\(tenant_id\)s +--------------+----------------------------------------+ | Field | Value | +--------------+----------------------------------------+ | enabled | True | | id | 7ea7de77ccdc4953871f9c0d39b7392d | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | b2b9dd57d11a43a6bdda7acefc3270d3 | | service_name | heat | | service_type | orchestration | | url | http://10.0.0.50:8004/v1/%(tenant_id)s | +--------------+----------------------------------------+ # create endpoint entry for orchestration (admin) root@dlp ~(keystone)# openstack endpoint create --region RegionOne orchestration admin http://$heat_api:8004/v1/%\(tenant_id\)s +--------------+----------------------------------------+ | Field | Value | +--------------+----------------------------------------+ | enabled | True | | id | 555c63bb3a544d7b9e3b5524b517a83b | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | b2b9dd57d11a43a6bdda7acefc3270d3 | | service_name | heat | | service_type | orchestration | | url | http://10.0.0.50:8004/v1/%(tenant_id)s | +--------------+----------------------------------------+ # create endpoint entry for cloudformation (public) root@dlp ~(keystone)# openstack endpoint create --region RegionOne cloudformation public http://$heat_api:8000/v1 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | d4fa06db642a44ad80060fd77c5bf6b4 | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | 00fa05c44c42447f8a3f1236fe1874fd | | service_name | heat-cfn | | service_type | cloudformation | | url | http://10.0.0.50:8000/v1 | +--------------+----------------------------------+ # create endpoint entry for cloudformation (internal) root@dlp ~(keystone)# openstack endpoint create --region RegionOne cloudformation internal http://$heat_api:8000/v1 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 3f374e16f2bd470db9ff3045bde1fed7 | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | 00fa05c44c42447f8a3f1236fe1874fd | | service_name | heat-cfn | | service_type | cloudformation | | url | http://10.0.0.50:8000/v1 | +--------------+----------------------------------+ # create endpoint entry for cloudformation (admin) root@dlp ~(keystone)# openstack endpoint create --region RegionOne cloudformation admin http://$heat_api:8000/v1 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 2a4b397fa1b2418d8943d09664309091 | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | 00fa05c44c42447f8a3f1236fe1874fd | | service_name | heat-cfn | | service_type | cloudformation | | url | http://10.0.0.50:8000/v1 | +--------------+----------------------------------+ # create Heat domain root@dlp ~(keystone)# openstack domain create --description "Stack projects and users" heat +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Stack projects and users | | enabled | True | | id | b363a1e1d56d4b2387c9b00f27d29ae2 | | name | heat | +-------------+----------------------------------+ # create "heat_domain_admin" user root@dlp ~(keystone)# openstack user create --domain heat --password servicepassword heat_domain_admin +---------------------+----------------------------------+ | Field | Value | +---------------------+----------------------------------+ | domain_id | b363a1e1d56d4b2387c9b00f27d29ae2 | | enabled | True | | id | a40065da56d3448db4a3dc233110fb47 | | name | heat_domain_admin | | password_expires_at | None | +---------------------+----------------------------------+ # add "heat_domain_admin" user to admin role root@dlp ~(keystone)# openstack role add --domain heat --user heat_domain_admin admin
|
[3] | Create a database for Heat to MariaDB. |
root@dlp ~(keystone)# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 75 Server version: 10.0.27-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04 Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
create database heat; Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on heat.* to heat@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on heat.* to heat@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) exit Bye |